layout: Reject promise if background loading is interrupted
Currently if a background manager is destroyed while we are waiting
for the background to load, the corresponding promise never resolves.
To prevent this from happening (and the startup animation getting
stuck as a result), guard the loading operation with a cancellable
and reject the promise when it is cancelled.